﻿using Eassets.Data.Asset;
using Eassets.Layered.Domain.Asset;
using System.Collections.ObjectModel;

namespace Eassets.Service.Asset
{
    public class AssetProcurementDetailsService
    {
        AssetProcurementDetailsData assetProcurementDetailsdata = new AssetProcurementDetailsData();

        /// <summary>
        /// Inserts assetProcurementDetails.
        /// </summary>
        /// <param name="assetProcurementDetails"></param>
        public void AddAssetProcurementDetails(AssetProcurementDetails assetProcurementDetails)
        {
            if (assetProcurementDetails != null)
            {
                assetProcurementDetailsdata.AddAssetProcurementDetails(assetProcurementDetails);
            }
        }

        /// <summary>
        /// Updates assetProcurementDetails.
        /// </summary>
        /// <param name="assetProcurementDetails"></param>
        public void ModifyAssetProcurementDetails(AssetProcurementDetails assetProcurementDetails)
        {
            if (assetProcurementDetails != null)
            {
                assetProcurementDetailsdata.ModifyAssetProcurementDetails(assetProcurementDetails);
            }
        }

        /// <summary>
        /// Delete assetProcurementDetails.
        /// </summary>
        /// <param name="assetProcurementDetailsId"></param>
        public void DeleteAssetProcurementDetails(long assetProcurementDetailsId)
        {
            if (assetProcurementDetailsId != 0)
            {
                assetProcurementDetailsdata.DeleteAssetProcurementDetails(assetProcurementDetailsId);
            }
        }

        /// <summary>
        /// GetbyId assetProcurementDetails.
        /// </summary>
        /// <param name="assetProcurementDetailsId"></param>
        /// <returns></returns>
        public AssetProcurementDetails GetByIdAssetProcurementDetails(long assetProcurementDetailsId)
        {
            return assetProcurementDetailsdata.GetByIdAssetProcurementDetails(assetProcurementDetailsId);
        }

        /// <summary>
        /// GetAll assetProcurementDetails.
        /// </summary>
        /// <returns></returns>
        public Collection<AssetProcurementDetails> GetAllAssetProcurementDetails()
        {
            return assetProcurementDetailsdata.GetAllAssetProcurementDetails();
        }
    }
}
